package net.wanho.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Calendar;
import java.util.Date;

/**
 * 配置类
 */
@Configuration
public class SpringConfig {

    /**
     * 向容器添加一个bean
     * <bean id="date" class=""></>
     */
    @Bean
    public Date date(){
        Calendar c = Calendar.getInstance();
        c.add(Calendar.DATE, 7);
        return c.getTime();
    }

}
